<template>
  <div id="DepositDetail">
    <div class="homeTitle">存放同业交易详情</div>
    <div class="tableBox">
      <div class="table">
        <!-- -------------------------------------------------------- -->
        <div class="tableTitle">申请人信息:</div>
        <table>
          <tr>
            <td>机构编号</td> <td>{{user.no}}</td>
            <td>机构名称</td> <td>{{user.bank}}</td>
          </tr>
          <tr>
            <td>操作员工号</td> <td>{{user.jobNum}}</td>
            <td>操作员姓名</td> <td>{{user.name}}</td>
          </tr>
        </table>
        <!-- ------------------------------------------------- -->
        <div class="tableTitle">交易类型及方式：</div>
        <table>
          <tr>
            <td>申请编号</td> <td>{{storeInnerBankTradeHold.applyNo}}</td>
            <td>申请日期</td> <td>{{storeInnerBankTradeHold.applyDate | dateformat}}</td>
          </tr>
          <tr>
            <td>交易类型</td> <td>{{storeInnerBankTradeHold.transactionType}}</td>
            <td>存款方式</td> <td>{{storeInnerBankTradeHold.depositMethod}}</td>
          </tr>
          <tr>
            <td>成交编号</td> <td>{{storeInnerBankTradeHold.successNo}}</td>
            <td></td> <td></td>
          </tr>
        </table>
        <!-- ----------------------------------------------- -->
        <div class="tableTitle">交易信息：</div>
        <table>
          <tr>
            <td>活期账号</td> <td>{{storeInnerBankTradeHold.currentAccount}}</td>
            <td>机构标识</td> <td>{{storeInnerBankTradeHold.agencyId}}</td>
          </tr>
          <tr>
            <td>账户名称</td> <td>{{storeInnerBankTradeHold.accountName}}</td>
            <td>机构类型</td> <td>{{storeInnerBankTradeHold.agencyType}}</td>
          </tr>
          <tr>
            <td>机构名称</td> <td>{{storeInnerBankTradeHold.agencyName}}</td>
            <td>开户行</td> <td>{{storeInnerBankTradeHold.accountBank}}</td>
          </tr>
          <tr>
            <td>计息基础</td> <td>{{storeInnerBankTradeHold.interestBase}}</td>
            <td>利率（%）</td> <td>{{storeInnerBankTradeHold.interestRate}}</td>
          </tr>
          <tr>
            <td>账户余额(元)</td> <td>{{storeInnerBankTradeHold.accountBalance}}</td>
            <td>本次交易金额(元)</td> <td>{{storeInnerBankTradeHold.tradeValue}}</td>
          </tr>
        </table>
 <!-- -------------------------------------------------------- -->
        <div class="tableTitle">交易信息：</div>
        <table>
          <tr>
            <td>机构标识</td> <td>{{storeInnerBankTradeHold.agencyId}}</td>
            <td>机构类型</td> <td>{{storeInnerBankTradeHold.agencyType}}</td>
          </tr>
          <tr>
            <td>机构名称</td> <td>{{storeInnerBankTradeHold.agencyName}}</td>
            <td>开户行</td> <td>{{storeInnerBankTradeHold.accountBank}}</td>
          </tr>
          <tr>
            <td>本次交易金额(元)</td> <td>{{storeInnerBankTradeHold.tradeValue}}</td>
            <td>交易利率（%）</td> <td>{{storeInnerBankTradeHold.tradeInterestRate}}</td>
          </tr>
          <tr>
            <td>起息日期</td> <td>{{storeInnerBankTradeHold.startInterestDate | dateformat}}</td>
            <td>期限</td> <td>{{storeInnerBankTradeHold.timeLimit}}</td>
          </tr>
          <tr>
            <td>到期日期</td> <td>{{storeInnerBankTradeHold.dueDate | dateformat}}</td>
            <td>计息基础</td> <td>{{storeInnerBankTradeHold.interestBase}}</td>
          </tr>
          <tr>
            <td>结息方式</td> <td>{{storeInnerBankTradeHold.interestMethod}}</td>
            <td>结息频率</td> <td>{{storeInnerBankTradeHold.interestFreq}}</td>
          </tr>
          <tr>
            <td>币种</td> <td>{{storeInnerBankTradeHold.currencyType}}</td>
            <td></td> <td></td>
          </tr>
        </table>
      </div>
      <div class="btn">
        <el-button type="primary" size="small" @click="close">关闭</el-button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'DepositDetail',
  data () {
    return {
      user: '',
      storeInnerBankTradeHold: ''
    };
  },
  mounted () {
    this.getdata();
  },
  methods: {
    getdata () {
      this.axios.get('storeInnerBankTradeHold/selectOne', {params: {id: this.$route.query.id}})
        .then(({data})=> {
          this.user = data.data.user;
          this.storeInnerBankTradeHold = data.data.storeInnerBankTradeHold;
        })
    },
    close () {
      this.$router.go(-1);
    }
  }
};
</script>

<style lang="scss">
  #DepositDetail {
    .tableBox {
      padding-top: 10;
      color: white;
      .tableTitle {
        line-height: 36px;
        padding-left: 20px;
      }
      table {
        border: 1px solid white;
        width: 100%;
        text-align: center;
        border-collapse:collapse;
        margin-bottom: 20px;
        tr {
          td {
            padding: 5px 10px;
            border-right: 1px solid white;
            border-bottom: 1px solid white;
            &:nth-child(odd) {
              background:#2F3638;
            }
            &:nth-child(even) {
              background: #646E6E;
            }
          }
        }
      }
      .btn {
        text-align: center;
      }
    }
  }
</style>
